package com.github.satant.job.biz.impl;

import com.github.satant.job.biz.StUserBiz;
import com.github.satant.job.common.biz.impl.BaseBizImpl;
import com.github.satant.job.entity.StUser;
import com.github.satant.job.mapper.StUserMapper;
import java.time.LocalDateTime;
import org.springframework.stereotype.Service;

/**
 * 用户表
 *
 * @author dear_satant
 * @email 446269825@qq.com
 * @date 2018-06-26 21:32:18
 */
@Service
public class StUserBizImpl extends BaseBizImpl<StUserMapper,StUser> implements StUserBiz {

    @Override
    public StUser insertSelective(StUser entity) {
        setDefault(entity);
        return super.insertSelective(entity);
    }


    public void setDefault(StUser entity){
        entity.setCreateTime(LocalDateTime.now());
    }
}